using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
namespace SharePointFix
{
    class Program
    {
        static void Main(string[] args)
        {
            SPDiagnosticsService diagService = SPDiagnosticsService.Local;

            try
            {
                diagService.ResetAll();
                Console.WriteLine("Sucessfully Reset");
                diagService.Delete();
                Console.WriteLine("Sucessfully Deleted");
                diagService = SPDiagnosticsService.Local;
                diagService.Update();
                Console.WriteLine("Sucessfully Updated");
                               
            }
            catch (Exception ex)
            {
                Console.WriteLine("Source: " + ex.Source);
                Console.WriteLine("Message: " + ex.Message);

            }


        }
    }
}
